package com.zatech.cgnci.project.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author EDY
 * @version 1.0
 * Create by 2024/12/18 17:40
 */
@Data
@ApiModel(value = "CheckReinsurerFocusDTO")
public class CheckReinsurerFocusDTO {

    @ApiModelProperty("险类")
    @NotEmpty(message = "risks cannot be null")
    @Valid
    private List<CgnciReinsuranceRiskCheckDTO> risks;

    @ApiModelProperty("方案信息")
    @NotEmpty(message = "reinsurers cannot be null")
    @Valid
    private List<CgnciReinsurerCheckDTO> reinsurers;

    @Data
    public static class CgnciReinsuranceRiskCheckDTO {

        @ApiModelProperty("险类层")
        @Valid
        @NotEmpty(message = "reinsurers cannot be null")
        private List<CgnciReinsuranceRiskLayerCheckDTO> riskLayers;
    }

    @Data
    public static class CgnciReinsuranceRiskLayerCheckDTO {

        @ApiModelProperty("分出限额")
        @NotNull(message = "cededLimit cannot be null")
        private BigDecimal cededLimit;
    }


    @Data
    public static class CgnciReinsurerCheckDTO {

        @ApiModelProperty("reinsurerCode")
        @NotNull(message = "reinsurerCode cannot be null")
        private String reinsurerCode;

        @ApiModelProperty("险类信息")
        @NotEmpty(message = "risks cannot be null")
        @Valid
        private List<CgnciReinsuranceRiskCheckDTO> risks;

    }


}
